package com.admin.model.pojo;

import com.admin.model.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.SqlCondition;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.*;

import java.io.Serializable;
import java.util.List;

/**
 * (Menu)实体类
 *
 * @author makejava
 * @since 2021-01-31 20:10:18
 */
@TableName(value = "sys_menu", resultMap = "BaseResultMap")
@Data
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
public class Menu extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 237720222101236808L;
    /**
     * id
     */
    private Long id;
    /**
     * 上级菜单ID
     */
    private Long pid;
    /**
     * 菜单类型
     */
    private Integer type;
    /**
     * 菜单标题
     */
    @TableField(condition = SqlCondition.LIKE)
    private String title;
    /**
     * 组件名称
     */
    private String name;
    /**
     * 组件地址
     */
    private String component;
    /**
     * 排序
     */
    private Integer sort;
    /**
     * 图标
     */
    private String icon;
    /**
     * 链接地址
     */
    private String path;
    /**
     * 是否外链
     */
    private Boolean frame;
    /**
     * 缓存
     */
    private Boolean cache;
    /**
     * 隐藏
     */
    private Boolean hidden;
    /**
     * 权限
     */
    private String permission;
    /**
     * 子菜单
     */
    @TableField(exist = false)
    private List<Menu> children;

}